import request from '@/utils/request'
import { parseStrEmpty } from "@/utils/ruoyi";

// 新增整栋
export function addBuilding(data) {
  return request({
    url: '/apartment/building/create',
    method: 'post',
    data: data
  })
}

// 编辑楼栋信息
export function editBuilding(data) {
  return request({
    url: '/apartment/building',
    method: 'put',
    data: data
  })
}
// 楼层列表
export function getList() {
  return request({
    url: '/apartment/building/list',
    method: 'get'
  })
}

// 删除整栋
export function remove(buildingIds) {
  return request({
    url: `/apartment/building/${buildingIds}`,
    method: 'delete'
  })
}

export default {
  addBuilding,
  editBuilding,
  getList,
  remove
}